<?php
namespace Admin\Controller;
use Think\Controller;
class IndexController extends Controller {
	//主页
    public function index(){
        if ($_COOKIE['adminuser'] == NULL) {
            $this->error('请登录','/graduation/admin/user/login',1);
        }
        $ryinfo = D('ryinfo');
        $this->assign('zongshu',$zongshu = $ryinfo->count());
        $this->assign('zaizhi',$zaizhi = $ryinfo->where("ry_zaizhi='在职'")->count());
        $this->assign('tuixiu',$zongshu - $zaizhi);
        $this->assign('xinren',$ryinfo->order('addtime desc')->limit('5')->select());
        $this->assign('invite',$invite = D('invite')->count());
        $this->display();
    }
    //反馈信息
    public function feedback(){
        if ($_COOKIE['adminuser'] == NULL) {
            $this->error('请登录','/graduation/admin/user/login',1);
        }
    	$this->display();
    }
}